#ifndef SDB_SCENE_H_
#define SDB_SCENE_H_

#include "material.h"
#include "object.h"
#include "light.h"

struct scene;

struct scene *scn_create(void);
void scn_free(struct scene *s);

void scn_print_info(struct scene *s, FILE *fp);

int scn_set_name(struct scene *s, const char *name);
const char *scn_get_name(struct scene *s);

int scn_read(struct scene *s, const char *fname);
int scn_read_file(struct scene *s, FILE *fp);

int scn_write(struct scene *s, const char *fname);
int scn_write_file(struct scene *s, FILE *fp);

int scn_add_material(struct scene *s, struct material *mat, const char *name);
struct material *scn_get_material(struct scene *s, const char *name);

int scn_add_object(struct scene *s, struct object *obj);
struct object *scn_get_object(struct scene *s, const char *name);

int scn_object_count(struct scene *s);
struct object *scn_object(struct scene *s, int idx);

int scn_add_light(struct scene *s, struct light *lt);
int scn_light_count(struct scene *s);
struct light *scn_light(struct scene *s, int idx);

#endif	/* SDB_SCENE_H_ */
